Optimal. Leaf size=193 \[ -\frac {5 i}{32 a^2 f \left (c^4-i c^4 \tan (e+f x)\right )}+\frac {5 i}{64 a^2 f \left (c^4+i c^4 \tan (e+f x)\right )}+\frac {15 x}{64 a^2 c^4}-\frac {3 i}{32 a^2 f \left (c^2-i c^2 \tan (e+f x)\right )^2}+\frac {i}{64 a^2 f \left (c^2+i c^2 \tan (e+f x)\right )^2}-\frac {i}{16 a^2 c f (c-i c \tan (e+f x))^3}-\frac {i}{32 a^2 f (c-i c \tan (e+f x))^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 193, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {3522, 3487, 44, 206} \[ -\frac {5 i}{32 a^2 f \left (c^4-i c^4 \tan (e+f x)\right )}+\frac {5 i}{64 a^2 f \left (c^4+i c^4 \tan (e+f x)\right )}-\frac {3 i}{32 a^2 f \left (c^2-i c^2 \tan (e+f x)\right )^2}+\frac {i}{64 a^2 f \left (c^2+i c^2 \tan (e+f x)\right )^2}+\frac {15 x}{64 a^2 c^4}-\frac {i}{16 a^2 c f (c-i c \tan (e+f x))^3}-\frac {i}{32 a^2 f (c-i c \tan (e+f x))^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 44
Rule 206
Rule 3487
Rule 3522
Rubi steps
\begin {align*} \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^4} \, dx &=\frac {\int \frac {\cos ^4(e+f x)}{(c-i c \tan (e+f x))^2} \, dx}{a^2 c^2}\\ &=\frac {\left (i c^3\right ) \operatorname {Subst}\left (\int \frac {1}{(c-x)^3 (c+x)^5} \, dx,x,-i c \tan (e+f x)\right )}{a^2 f}\\ &=\frac {\left (i c^3\right ) \operatorname {Subst}\left (\int \left (\frac {1}{32 c^5 (c-x)^3}+\frac {5}{64 c^6 (c-x)^2}+\frac {1}{8 c^3 (c+x)^5}+\frac {3}{16 c^4 (c+x)^4}+\frac {3}{16 c^5 (c+x)^3}+\frac {5}{32 c^6 (c+x)^2}+\frac {15}{64 c^6 \left (c^2-x^2\right )}\right ) \, dx,x,-i c \tan (e+f x)\right )}{a^2 f}\\ &=-\frac {i}{32 a^2 f (c-i c \tan (e+f x))^4}-\frac {i}{16 a^2 c f (c-i c \tan (e+f x))^3}-\frac {3 i}{32 a^2 f \left (c^2-i c^2 \tan (e+f x)\right )^2}+\frac {i}{64 a^2 f \left (c^2+i c^2 \tan (e+f x)\right )^2}-\frac {5 i}{32 a^2 f \left (c^4-i c^4 \tan (e+f x)\right )}+\frac {5 i}{64 a^2 f \left (c^4+i c^4 \tan (e+f x)\right )}+\frac {(15 i) \operatorname {Subst}\left (\int \frac {1}{c^2-x^2} \, dx,x,-i c \tan (e+f x)\right )}{64 a^2 c^3 f}\\ &=\frac {15 x}{64 a^2 c^4}-\frac {i}{32 a^2 f (c-i c \tan (e+f x))^4}-\frac {i}{16 a^2 c f (c-i c \tan (e+f x))^3}-\frac {3 i}{32 a^2 f \left (c^2-i c^2 \tan (e+f x)\right )^2}+\frac {i}{64 a^2 f \left (c^2+i c^2 \tan (e+f x)\right )^2}-\frac {5 i}{32 a^2 f \left (c^4-i c^4 \tan (e+f x)\right )}+\frac {5 i}{64 a^2 f \left (c^4+i c^4 \tan (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.31, size = 139, normalized size = 0.72 \[ \frac {\sec ^2(e+f x) (\sin (4 (e+f x))-i \cos (4 (e+f x))) (-120 f x \sin (2 (e+f x))-30 i \sin (2 (e+f x))-32 i \sin (4 (e+f x))-3 i \sin (6 (e+f x))+(-30-120 i f x) \cos (2 (e+f x))+16 \cos (4 (e+f x))+\cos (6 (e+f x))-80)}{512 a^2 c^4 f (\tan (e+f x)-i)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.52, size = 90, normalized size = 0.47 \[ \frac {{\left (120 \, f x e^{\left (4 i \, f x + 4 i \, e\right )} - i \, e^{\left (12 i \, f x + 12 i \, e\right )} - 8 i \, e^{\left (10 i \, f x + 10 i \, e\right )} - 30 i \, e^{\left (8 i \, f x + 8 i \, e\right )} - 80 i \, e^{\left (6 i \, f x + 6 i \, e\right )} + 24 i \, e^{\left (2 i \, f x + 2 i \, e\right )} + 2 i\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{512 \, a^{2} c^{4} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.20, size = 149, normalized size = 0.77 \[ -\frac {-\frac {60 i \, \log \left (-i \, \tan \left (f x + e\right ) + 1\right )}{a^{2} c^{4}} + \frac {60 i \, \log \left (-i \, \tan \left (f x + e\right ) - 1\right )}{a^{2} c^{4}} + \frac {2 \, {\left (-45 i \, \tan \left (f x + e\right )^{2} - 110 \, \tan \left (f x + e\right ) + 69 i\right )}}{a^{2} c^{4} {\left (\tan \left (f x + e\right ) - i\right )}^{2}} + \frac {125 i \, \tan \left (f x + e\right )^{4} - 580 \, \tan \left (f x + e\right )^{3} - 1038 i \, \tan \left (f x + e\right )^{2} + 868 \, \tan \left (f x + e\right ) + 301 i}{a^{2} c^{4} {\left (\tan \left (f x + e\right ) + i\right )}^{4}}}{512 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.28, size = 181, normalized size = 0.94 \[ \frac {3 i}{32 f \,a^{2} c^{4} \left (\tan \left (f x +e \right )+i\right )^{2}}-\frac {i}{32 f \,a^{2} c^{4} \left (\tan \left (f x +e \right )+i\right )^{4}}+\frac {15 i \ln \left (\tan \left (f x +e \right )+i\right )}{128 f \,a^{2} c^{4}}-\frac {1}{16 f \,a^{2} c^{4} \left (\tan \left (f x +e \right )+i\right )^{3}}+\frac {5}{32 f \,a^{2} c^{4} \left (\tan \left (f x +e \right )+i\right )}-\frac {15 i \ln \left (\tan \left (f x +e \right )-i\right )}{128 f \,a^{2} c^{4}}-\frac {i}{64 f \,a^{2} c^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {5}{64 f \,a^{2} c^{4} \left (\tan \left (f x +e \right )-i\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.05, size = 98, normalized size = 0.51 \[ \frac {15\,x}{64\,a^2\,c^4}-\frac {\frac {15\,{\mathrm {tan}\left (e+f\,x\right )}^5}{64}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,15{}\mathrm {i}}{32}+\frac {5\,{\mathrm {tan}\left (e+f\,x\right )}^3}{32}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,25{}\mathrm {i}}{32}-\frac {17\,\mathrm {tan}\left (e+f\,x\right )}{64}+\frac {1}{4}{}\mathrm {i}}{a^2\,c^4\,f\,{\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2\,{\left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.66, size = 298, normalized size = 1.54 \[ \begin {cases} \frac {\left (- 8589934592 i a^{10} c^{20} f^{5} e^{14 i e} e^{8 i f x} - 68719476736 i a^{10} c^{20} f^{5} e^{12 i e} e^{6 i f x} - 257698037760 i a^{10} c^{20} f^{5} e^{10 i e} e^{4 i f x} - 687194767360 i a^{10} c^{20} f^{5} e^{8 i e} e^{2 i f x} + 206158430208 i a^{10} c^{20} f^{5} e^{4 i e} e^{- 2 i f x} + 17179869184 i a^{10} c^{20} f^{5} e^{2 i e} e^{- 4 i f x}\right ) e^{- 6 i e}}{4398046511104 a^{12} c^{24} f^{6}} & \text {for}\: 4398046511104 a^{12} c^{24} f^{6} e^{6 i e} \neq 0 \\x \left (\frac {\left (e^{12 i e} + 6 e^{10 i e} + 15 e^{8 i e} + 20 e^{6 i e} + 15 e^{4 i e} + 6 e^{2 i e} + 1\right ) e^{- 4 i e}}{64 a^{2} c^{4}} - \frac {15}{64 a^{2} c^{4}}\right ) & \text {otherwise} \end {cases} + \frac {15 x}{64 a^{2} c^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________